package cn.edu.scau.cmi.huxiantao.adapter;

import java.net.URL;
import java.util.ResourceBundle;

import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.TextArea;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;

public class Ctrl implements Initializable{
	@FXML
	private TextArea text;
	@FXML
	private ImageView imageView;
	
	@FXML
	private void onClassAction() {
		Target classTarget=new AdapterOfClass();
		String result=text.getText()+classTarget.doTarget()+"\n";
		text.setText(result);
	}
	@FXML
	private void onObjectAction() {
		Target objectTarget=new AdapterOfObject();
		String result=text.getText()+objectTarget.doTarget()+"\n";
		text.setText(result);
	}
	@Override
	public void initialize(URL arg0, ResourceBundle arg1) {
		imageView.setImage(new Image("/cn/edu/scau/cmi/huxiantao/pic/pic.jpg"));
	}
}
